import { EzGameWebsocket } from "../cleint/EzGameWebsocket";
import { NetClient } from "../cleint/NetClient";
import {
    C2G_EquipUpLevel,
    G2C_EquipUpLevel
} from "../proto/proto";

export class GameServerApi{
    private static _ins:GameServerApi = new GameServerApi()

    public static get Ins(){
        return this._ins;
    }

    net:NetClient;
    netType:number = 2;//1tcp 2websocket 3udp

    start(){
        if(this.net!=null && this.net.isOpen()){
            return
        }
        //创建ws
        this.net = EzGameWebsocket.builder().url("123").build();
    }


    //#region 消息

    public equipUpLevel(req:C2G_EquipUpLevel):G2C_EquipUpLevel{
        
        return null
    }

    public equipUpLevelAsync(req:C2G_EquipUpLevel,successCb:(resp:G2C_EquipUpLevel)=>void,falCb:Function):G2C_EquipUpLevel{

        return null
    }
    //#endregion
}

